<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<html:form action="/registration.do?do=submit"  method="post" onsubmit="return validateRegistrationForm(this);">
<html:errors/>
	<h1>Welcome to the Carbon Counter Website</h1>
	<h3>We help individuals and organizations manage their environmental footprint</h3>

	<table>
		<tr>
			<td>
				<%if(session.getAttribute("Customer") == null){ %>
					<h2> Register by entering your information below </h2>
				<%} else{ %>
					<h3>Update Profile</h3>
				 <%} %>
			</td>
		</tr>
			<tr>
			<td>
				<label>Carbon balance:</label>
				<html:text property="carbonBalance" disabled="disabled"/>
			</td>
			<td>
				<button>Purchase Credits</button>
			</td>
			<td>
				<label>Current Carbon Price:$</label>
				<input type="text" disabled="disabled" value="1.2"/>
			</td>
		</tr>
	</table>
	<br/>
	<table>
		<tr>
			<td>
				<h4>Registration Info</h4>
			</td>
		</tr>
		<tr>
			<td>
				<label>First Name: </label>
			</td>
			<td>
				<html:text property="first"/>
			</td>
		</tr>
		<tr>
			<td>
				<label>Last Name: </label>
			</td>
			<td>
				<html:text property="last"/>
			</td>
		</tr>
		<tr>
			<TD> 
				<LABEL for="txt_M_or_F">Male or Female:  </LABEL>
			</TD>
			<TD>
				<SELECT NAME="txt_M_or_F">
				<OPTION VALUE="A"SELECTED>M
				<OPTION VALUE="A">F
				</SELECT> 
			</TD>
		</tr>	
		<tr>
			<td>
				<label>Email: </label>
			</td>
			<td>
				<html:text property="email"/>
			</td>
		</tr>
		<tr>
			<td>
				<label>User Name: </label>
			</td>
			<td>
				<html:text property="userName"/>
			</td>
		</tr>
		<tr>
			<td>
				<label>Password: </label>
			</td>
			<td>
				<html:password property="password"/>
			</td>
		</tr>
		<tr>
			<td>
				<label>Confirm Password: </label>
			</td>
			<td>
				<html:password property="confirmPassword"/>
			</td>
		</tr>
		<tr>
			<td>
				<label>Zip Code: </label>
			</td>
			<td>
				<html:text property="zip"/>
			</td>
		</tr>
		<tr>
			<td>
			
			</td>
			<td>
				<html:submit value="Submit"/>
			</td>
		</tr>
	</table>
	
	<html:javascript formName="registrationForm"/>
	
</html:form>